#include<stdio.h>
#include<algorithm>
using namespace std;

const int maxn=1e5+10;

double node1(int n,int years)
{
	double r=0.03;
	double P=n*(1+years*r);
	return P;
}

double node2(int n,int years1,int years2)
{
	double r1=0.021;
	double r2=0.0275;
	double P=n*(1+years1*r1);
	P=P*(1+years2*r2);
	return P;
}

double node3(int n,int years1,int years2)
{
	double r1=0.021;
	double r2=0.0275;
	double P=n*(1+years2*r2);
	P=P*(1+years1*r1);
	return P;
}

double node4(int n,int years)
{
	double r=0.015;
	double P=n;
	for(int i=0;i<years;i++){
		P*=(1+r);
	}
	return P;
}

double node5(int n,int years)
{
	double r=0.0035;
	double P=n;
	for(int i=0;i<4*years;i++){
		P*=(1+r/4);
	}
	return P;
}

int main()
{
	printf("(1):%5.2f\n",node1(1000,5));
	printf("(2):%5.2f\n",node2(1000,2,3));
	printf("(3):%5.2f\n",node3(1000,2,3));
	printf("(4):%5.2f\n",node4(1000,5));
	printf("(5):%5.2f\n",node5(1000,5));
	return 0;
}
